<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
 * Summary : 博客分类表
 * Author : Steven Wang
 * Date : 22 Oct,2011
 */
class Category extends CI_Model
{
	protected $_name = 'blog_category';

	/*
	 summary : 根据分类编号获取分类信息
	 author : Steven Wang
	 date : 22 Oct,2011

	 params :
	 <int>$categoryId : 分类编号
	 return :
	 array
	 	[Blog_Category_Name] => ...
	*/
	function getCategoryNameByID($categoryId)
	{
		$query = $this->db
					->select(array(
						"Blog_Category_Name"
					))
					->from($this->_name)
					->where("Blog_Category_ID",$categoryId)
					->get();
		$result = $query->result_array();
		return $result[0];
	}
}


?>